home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / utility2 / wine02bx.zip / LISP / MODES / POSTSCRI.ELC < prev    next >
Text File  |  1993-03-28  |  6KB  |  76 lines

  1. ;;; compiled by @win386 on Sat Mar 13 14:32:48 1993
  2. ;;; from file c:/src/lucid-19.4/lisp/modes/postscri.el
  3. ;;; emacs version 19.3 Lucid.
  4. ;;; bytecomp version 2.08; 27-aug-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (provide 'postscript)
  14. (defconst ps-indent-level 2 "\
  15. *Indentation to be used inside of PostScript blocks or arrays")
  16. (defconst ps-tab-width 8 "\
  17. *Tab stop width for PostScript mode")
  18. (fset 'ps-make-tabs #[(stop) "┴W¡ç┬ \\!Bç" [stop 132 ps-make-tabs ps-tab-width] 4])
  19. (defconst ps-tab-stop-list (ps-make-tabs ps-tab-width) "\
  20. *Tab stop list for PostScript mode")
  21. (defconst ps-postscript-command "gs -" "\
  22. *Command used to invoke with a printer spooler or NeWS server.")
  23. (defvar ps-mode-map nil "\
  24. Keymap used in PostScript mode buffers")
  25. (defvar ps-mode-syntax-table nil "\
  26. PostScript mode syntax table")
  27. (fset 'postscript-mode #[nil "└ ê┴\n!ê ½å─ !ê¬Ñ┼ ─ !ê╞╟╚\"ê╞╔╩\"ê╞╦╠\"ê╞═╬\"ê╞╧╨\"ê╞╤╥\"ê╙╘!ê╙╒!ê╙╓!ê╙╫!ê╙╪!ê╙┘!ê┌█╟▄▌▀ ß\"πΣ!êπσ!ç" [kill-all-local-variables use-local-map ps-mode-map ps-mode-syntax-table set-syntax-table make-syntax-table modify-syntax-entry 40 "(" 41 ")" 91 "(]" 93 ")[" 37 "<" 10 ">" make-local-variable comment-start comment-start-skip comment-column indent-line-function tab-stop-list page-delimiter "% " "% *" ps-indent-line "^showpage" ps-tab-stop-list "PostScript" mode-name postscript-mode major-mode run-hooks ps-mode-hook postscript-mode-hook] 3 "\
  28. Major mode for editing PostScript files.
  29.  
  30. \\[ps-execute-buffer] will send the contents of the buffer to the NeWS
  31. server using psh(1).  \\[ps-execute-region] sends the current region.
  32. \\[ps-shell] starts an interactive psh(1) window which will be used for
  33. subsequent \\[ps-execute-buffer] or \\[ps-execute-region] commands.
  34.  
  35. In this mode, TAB and \\[indent-region] attempt to indent code
  36. based on the position of {}, [], and begin/end pairs.  The variable
  37. ps-indent-level controls the amount of indentation used inside
  38. arrays and begin/end pairs.  
  39.  
  40. \\{ps-mode-map}
  41.  
  42. \\[postscript-mode] calls the value of the variable postscript-mode-hook 
  43. with no args, if that value is non-nil." nil])
  44. (fset 'ps-tab #[nil "è└┴xên)½â┬ çè┬ )ç" ["     " nil ps-indent-line] 2 "\
  45. Command assigned to the TAB key in PostScript mode." nil])
  46. (fset 'ps-indent-line #[nil "└yê┴ ê┬├!«é─ ?¡Ö`dW½è`fz┼=½â╞ ç┬╟!½â╚ ç╔ ç" [0 delete-horizontal-space looking-at "%%" ps-top-level-p 41 ps-indent-close "\\(dict\\|class\\)?end\\|cdef\\|grestore" ps-indent-end ps-indent-in-block] 2 "\
  47. Indents a line of PostScript code." nil])
  48. (fset 'ps-open #[nil "cç" [last-command-char] 1 nil nil])
  49. (fset 'ps-insert-d-char #[(arg) "└    \n\"êè├yê─┼!¡à╞ ê╟ )ç" [insert-char last-command-char arg 0 looking-at "^[     ]*\\(\\(dict\\|class\\)?end\\|cdef\\|grestore\\)" delete-horizontal-space ps-indent-end] 3 "\
  50. Awful hack to make \"end\" and \"cdef\" keywords indent themselves." "p"])
  51. (fset 'ps-close #[nil "cê┴┬!ê├ ê┬uê─ ç" [last-command-char backward-char 1 ps-indent-close blink-matching-open] 2 "\
  52. Inserts and indents a close delimiter." nil])
  53. (fset 'ps-indent-close #[nil "è└┴xên)¡»┴`┴uê─ ê┼`\n\"╞=½ï╞\n`ZV½ä\nb¬æ╟yê└┴wêi\nbê╚ ê j*ç" ["     " nil oldpoint x backward-sexp count-lines 1 0 delete-horizontal-space] 3 "\
  54. Internal function to indent a line containing a an array close delimiter."])
  55. (fset 'ps-indent-end #[nil "└ ë¼ä┬ ¬îè    bê├ êi)ëj)ç" [ps-block-start goal indent-relative back-to-indentation] 2 "\
  56. Indent an \"end\" token or array close delimiter."])
  57. (fset 'ps-indent-in-block #[nil "└ è    bê┬ ên½â ¬å┬ êi \\)ëj)ç" [ps-block-start goal back-to-indentation ps-indent-level] 3 "\
  58. Indent a line which does not open or close a block."])
  59. (fset 'ps-block-start #[nil "è└┴└─┼Å╞ !+ç" [nil 0 skip open (byte-code "è└┴!ê`T)ç" [backward-up-list 1] 2) ((error)) ps-begin-end-hack] 3 "\
  60. Returns the character position of the character following the nearest
  61. enclosing `[' `{' or `begin' keyword."])
  62. (fset 'ps-begin-end-hack #[(start) "è└┴ë─V½ƒ┼╞╚#¼ê┼╔╚#½Å╩╦!½ä T¬é Së¬] ─=¼ä¬ä└vê`+ç" [1 nil match depth 0 re-search-backward "^[     ]*\\(dict\\|class\\)?\\(end\\|grestore\\)\\|\\(begin\\|gsave\\)[     ]*\\(%.*\\)*$" start t "^[     ]*cdef.*$" looking-at "[     ]*\\(dict\\|class\\)?\\(end\\|grestore\\)"] 5 "\
  63. Search backwards from point to START for enclosing `begin' and returns the
  64. character number of the character following `begin' or START if not found."])
  65. (fset 'ps-top-level-p #[nil "└┴┬Å¡ä├└!?ç" [nil (byte-code "└`┴┬#?ç" [scan-lists -1 1] 4) ((error t)) ps-begin-end-hack] 3 "\
  66. Awful test to see whether we are inside some sort of PostScript block."])
  67. (byte-code "¼┐┴ ┬├─#ê┬┼─#ê┬╞╟#ê┬╚╔#ê┬╩╟#ê┬╦╔#ê┬╠═#ê┬╬╧#ê┬╨╤#ê┬╥╙#ê┴ç" [ps-mode-map make-sparse-keymap define-key "d" ps-insert-d-char "f" "{" ps-open "}" ps-close "[" "]" "    " ps-tab "" ps-execute-buffer "|" ps-execute-region "!" ps-shell] 4)
  68. (fset 'ps-execute-buffer #[nil "è└ ê┴ed\")ç" [mark-whole-buffer ps-execute-region] 3 "\
  69. Send the contents of the buffer to a printer or NeWS server." nil])
  70. (fset 'ps-execute-region #[(start end) "`└ ^`└ ]├─┼Å*ç" [mark end start nil (byte-code "└┴\n {\"ç" [process-send-string "PostScript" start end] 4) ((error (shell-command-on-region start end ps-postscript-command nil)))] 3 "\
  71. Send the region between START and END to a printer or NeWS server.
  72. You should kill any existing *PostScript* buffer unless you want the
  73. PostScript text to be executed in that process." "r"])
  74. (fset 'ps-shell #[nil "└┴!ê┬├─\"!ê╞╟!ê╚ëç" [require shell switch-to-buffer-other-window make-shell "PostScript" ps-postscript-command make-local-variable shell-prompt-pattern "GS>"] 4 "\
  75. Start a shell communicating with a PostScript printer or NeWS server." nil])
  76.